package com.youcheng.mapper;

import com.youcheng.dao.Admin;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface AdminMapper {

    //根据用户名获取用户信息
    public abstract Admin getByUsername(@Param("username") String username);

    //更新用户信息
    public abstract int updateById(Admin admin);

    public abstract int lockAdmin(int id,int is_lock);

    public abstract int addAdmin(Admin admin);

    public abstract List<Admin> listAllAdmin(String username,int is_lock);

    public abstract Admin getById(int id);

}
